interface IPerson {
  name: string;
  age?: number;
  slogan: string;
}

// 类型体操 readonly 将属性变为只读
type RequiredType<T> = {
  readonly [P in keyof T]?: T[P];
}

type RequiredPerson = RequiredType<IPerson>;

const person: RequiredPerson = {
  name: 'RequiredPerson',
  age: 18,
  slogan: 'slogan'
}

export {}
